package com.xtr.kafka.listener;

import org.apache.kafka.clients.consumer.ConsumerRecord;
import org.springframework.kafka.annotation.KafkaListener;

public class Listener1 {

    @KafkaListener(topics = {"test-topic1"})
    public void listen(ConsumerRecord<?, ?> record) {
//        Optional<?> kafkaMessage = Optional.ofNullable(record.value());
        System.out.println(record.value());
        System.out.println(record.topic());
        System.out.println(record.partition());
    }
}